
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author djdracku
 */
public class EjemploAWT {



   
    public static void main(String args[]){
        Frame f=new Frame();

        FlowLayout flo=new FlowLayout();
        flo.setHgap(50);  //h es horizontal que cada 50 pixeles hayga un elemnto
        f.setLayout(flo);

        Button b1=new Button("1");
        Button b2=new Button("2");
        Button b3=new Button("3");
        Button b4=new Button("4");
        Button b5=new Button("5");

        //f.setLayout(new FlowLayout());
        f.add(b1,"South");
        f.add(b2,"North");
        f.add(BorderLayout.WEST,b3);
        f.add(BorderLayout.EAST,b4);
        f.add(BorderLayout.CENTER,b5);

        f.setSize(400, 400);
        f.setVisible(true);

        

    }

}
